home *** CD-ROM | disk | FTP | other *** search
/ Internet Info 1994 March / Internet Info CD-ROM (Walnut Creek) (March 1994).iso / networking / ip / ka9q / aztecnos.arc / SESSION.H < prev    next >
Encoding:
C/C++ Source or Header  |  1989-02-22  |  1.2 KB  |  51 lines

  1. #ifndef    NULLSESSION
  2. #include <stdio.h>
  3. #include "global.h"
  4. #include "ftpcli.h"
  5. #include "telnet.h"
  6. #include "icmp.h"
  7. #include "ax25tnc.h"
  8. #include "proc.h"
  9.  
  10. extern int mode;
  11. #define    CMD_MODE    1    /* Command mode */
  12. #define    CONV_MODE    2    /* Converse mode */
  13.  
  14. /* Session control structure; only one entry is used at a time */
  15. struct session {
  16.     int type;
  17. #define    FREE    0
  18. #define    TELNET    1
  19. #define    FTP    2
  20. #define    AX25TNC    3
  21. #define    FINGER    4
  22. #define    PING    5
  23.     char *name;    /* Name of remote host */
  24.     union {
  25.         struct ftpcli *ftp;
  26.         struct telnet *telnet;
  27.         struct ax25tnc *ax25;
  28.         struct proc *finger;
  29.         struct ping *ping;
  30.     } cb;
  31.     int s;            /* Network socket (control for FTP) */
  32.     struct mbuf *input;    /* Console input */
  33.     FILE *record;        /* Receive record file */
  34.     char *rfile;        /* Record file name */
  35.     FILE *upload;        /* Send file */
  36.     char *ufile;        /* Upload file name */
  37.     int ttymode;        /* Raw or cooked */
  38. };
  39. #define    NULLSESSION    (struct session *)0
  40. extern unsigned Nsessions;
  41. extern struct session *Sessions;
  42. extern struct session *Current;
  43. extern struct session *Lastcurrent;
  44. struct session *newsession();
  45.  
  46. extern int16 Lport;
  47. #define    ALERT_EOF    1
  48.  
  49.  
  50. #endif    /* NULLSESSION */
  51.